<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ include file="taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <t:header title="${actionBean.teacher.fullName} Auctions"/>
    </head>
    <body>
        <div id="header">
            <div id="titleSection">
                <t:pageheader title="${actionBean.teacher.fullName} Auctions"/>
            </div>
        </div>
        <div id="contentPanel">
            <t:leftsidenav/>
            <div id="pageContent" class="cell" style="padding-left: 15px">
                <div class="sectionTitle">${actionBean.teacher.fullName} Auctions</div>
                <c:choose>
                    <c:when test="${fn:length(actionBean.auctions) == 0}">
                        <p>No auctions for ${actionBean.teacher.fullName}.</p>
                    </c:when>
                    <c:otherwise>
                        <dt:table uid="auctiontable" list="${actionBean.auctions}" id="obj" class="display">
                            <dt:column property="title" title="Title" maxLength="30"/>
                            <dt:column title="Start Date">
                                <fmt:formatDate pattern="MM-dd-yyyy hh:mma " timeZone="America/Los_Angeles" value="${obj.startDate}"/>
                            </dt:column>
                            <dt:column title="End Date">
                                <fmt:formatDate pattern="MM-dd-yyyy hh:mma " timeZone="America/Los_Angeles" value="${obj.endDate}"/>
                            </dt:column>
                            <dt:column property="amount" title="Current Amount" format="{0,number,currency}"/>
                            <dt:column>
                                <s:link beanclass="pkg.action.ShowAuctionActionBean" event="viewAuction">
                                    View
                                    <s:param name="auction.id" value="${obj.id}"/>
                                </s:link>
                            </dt:column>
                        </dt:table>
                    </c:otherwise>
                </c:choose>
            </div>
        </div>
    </body>
</html>
